package com.cjq.goods.controller;

import com.cjq.common.domain.Type;
import com.cjq.common.result.Result;
import com.cjq.goods.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/type")
public class TypeController {
    @Autowired
    private TypeService typeService;

    /**
     * 类型下拉框
     * @return
     */
    @GetMapping("/typeList")
    public Result<List<Type>> typeList(){
        return typeService.typeList();
    }
}
